$result = $db_zugriff->query("SELECT boardid FROM bb".$n."_object2board WHERE objectid = '$user_group' AND boardpermission = 1".ifelse($tempforumchoice," AND boardid='$tempforumchoice'",""));
while ($row = $db_zugriff->fetch_array($result)) $permissioncache[$row[boardid]] = 1;
$board_result = $db_zugriff->query("SELECT boardid FROM bb".$n."_boards WHERE boardpassword = ''");
$rank = $db_zugriff->query_first("SELECT * FROM bb".$n."_ranks WHERE groupid = $posts[groupid] AND posts<='$posts[userposts]' ORDER by posts DESC LIMIT 1");
$getthreadids=$db_zugriff->query("SELECT threadid FROM bb".$n."_threads WHERE threadid IN (0$allthreadids) ORDER BY timelastreply DESC LIMIT ".($tproseite*($page-1)).",".$tproseite);